<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>添加题目</title>
    <base href="${pageContext.request.scheme }://${pageContext.request.serverName }:${pageContext.request.serverPort }${pageContext.request.contextPath }/ "/>
</head>
<body>
    <h1>添加题目</h1>
    <form action="/addQuestion1" enctype="multipart/form-data" method="post">
        <p>题目内容：<input type="text" placeholder="请输入题目" name="content"></p>
        <p>选项A：<input type="text" placeholder="请输入选项A" name="optionA"></p>
        <p>选项B：<input type="text" placeholder="请输入选项B" name="optionB"></p>
        <p>选项C：<input type="text" placeholder="请输入选项C" name="optionC"></p>
        <p>选项D：<input type="text" placeholder="请输入选项D" name="optionD"></p>
<%--        <p>答案：<input type="text" placeholder="请输入答案" name="answer"></p>--%>
        <p>答案：
            <select name="answer">
                <option value="A">A</option>
                <option value="B">B</option>
                <option value="C">C</option>
                <option value="D">D</option>
            </select>
        </p>

<%--        <p>难度：<input type="text" placeholder="请输入难度" name="difficulty"></p>--%>
        <p>课程名：
            <select name="difficulty">
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4</option>
                <option value="5">5</option>
            </select>
        </p>
<%--        <p>考试题编号：<input type="text" placeholder="请输入考试题编号" name="questionSetId"></p>--%>
        <p>考试题编号：
        <select name="questionSetId">
            <c:forEach var="questionSet" items="${questionSets}">
                <option value="${questionSet.id}">${questionSet.title}</option>
            </c:forEach>
        </select>
        </p>

        <p>图片：<input type="file" name="image"></p>
        <p><input type="submit" value="添加"></p>
    </form>
</body>
</html>
